package com.javase.sy06.Q1;

public class Cylinder implements Shape{

    int r,height;

    public Cylinder(int r, int height) {
        this.r = r;
        this.height = height;
    }

    @Override
    public double area() {
        double area = 2 * PI * r * height;
        return area;
    }

    @Override
    public double volume() {
        double volume = PI * r * r * height;
        return volume;
    }
}
